def print_char_reversely(chars):
    """
    字符串反向输出。
    :param chars: 字符串
    """
    if len(chars) > 0:
        print(chars[-1], end='')
        return print_char_reversely(chars[0:-1])


def main():
    chars = input('请输入一串字符：')
    print_char_reversely(chars)


main()
